package com.migration.model.newdb;

import jakarta.persistence.*;
import lombok.Data;
import java.io.Serializable;

/**
 * 设备-步骤 实体类
 * 表名：risk_device_step
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "risk_device_step")
public class RiskDeviceStep implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 部门ID
     */
    @Column(name = "department_id", nullable = false)
    private Long departmentId;
    
    /**
     * 设备ID
     */
    @Column(name = "device_id", nullable = false)
    private Long deviceId;
    
    /**
     * 步骤ID
     */
    @Column(name = "step_id", nullable = false)
    private Long stepId;
    
    /**
     * 偏离ID
     */
    @Column(name = "deviation_id")
    private Long deviationId;
    
    /**
     * 原因数量
     * 默认值: 0
     */
    @Column(name = "cause_quantity")
    private Integer causeQuantity;
    
    /**
     * 已分析出后果的数量
     * 默认值: 0
     */
    @Column(name = "consequence_quantity")
    private Integer consequenceQuantity;
    
    @Override
    public String toString() {
        return "RiskDeviceStep{" +
            "id=" + id +
            ", departmentId=" + departmentId +
            ", deviceId=" + deviceId +
            ", stepId=" + stepId +
            ", deviationId=" + deviationId +
            ", causeQuantity=" + causeQuantity +
            ", consequenceQuantity=" + consequenceQuantity +
        '}';
    }
} 